import QtQuick 2.0

//UnitMenuItem element for use in UnitMenu context menu.

Rectangle {
    property alias text: menuText.text
    signal clicked

    anchors.left: parent.left
    anchors.right: parent.right
    height: 20
    color: "grey"
    border.color: "#333333"
    radius: 3
    //anchors.margins: 1

    Text {
        id: menuText
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.verticalCenter: parent.verticalCenter
        font.pixelSize: parent.height - 6
    }
    MouseArea {
        anchors.fill: parent;
        onClicked: {
            onClicked: parent.clicked()
        }
    }
}
